<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "head.ftl" />
</head>
<body>
<div class="body-box">
<div class="rhead">
	<div class="rpos">当前位置: 注册用户 - 列表</div>
	<div class="clear"></div>
</div>
<div style="padding:10px;">
	<div>
	<form id="search_from">
	<input type="text" name="searchWord" value="${searchWord}" placeholder="用户名、手机、邮箱">
	<input type="submit" value="查找">
	</form>
	</div>
	<div class="clear"></div>
</div>
<form id="tableForm" method="post">
<input type="hidden" name="pageNo" value="1"/>
<table class="pn-ltable" style="" width="100%" cellspacing="1" cellpadding="0" border="0">
<thead class="pn-lthead"><tr>
	<th width="20"><input type='checkbox' onclick='Pn.checkbox("ids",this.checked)'/></th>
	<th>ID</th>
	<th>会员名称</th>
	<th>电话号码</th>
	<th>邮箱</th>
	<th>登录时间</th>
	<th>注册时间</th>
	<th>操作选项</th></tr></thead>
<tbody  class="pn-ltbody">
<#list memberList as m>
<tr>
	<td><input type='checkbox' name='ids' value='1'/></td>
	<td>${m.memberId}</td>
	<td id="name_${m.memberId}">${m.name}</td>
	<td>${m.mobile}</td>
	<td>${m.email}</td>
	<td><#if m.loginTime gt 0>${m.loginTime?number_to_datetime}</#if>&nbsp;</td>
	<td>${m.registerTime?number_to_datetime}</td>
	<td align="center"><a href="${st.domain}/member/detail?memberId=${m.memberId}" class="pn-opt">详情</a>&nbsp;<a href="javascript:;" id="resetPwd_${m.memberId}" class="pn-opt">密码重置</a></td>
</tr>
</#list>
</tbody>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" class="pn-sp">
	<div id="pageLink" class="pageLinks">${pageLink.linkString}</div>
</td></tr></table>
</form>
</div>
<script>
var editPath = g_domain + "/member/editDo/json";
$("[id^='resetPwd_']").click(function() {
	var memberId = $(this).attr("id").replace("resetPwd_", "");
	var name = $("#name_" + memberId).html();
	if (!confirm("用户(" + name + ")密码将被重置为:123456,确定吗?")) {
		return;
	}
	$.post(editPath, {memberId: memberId, password: "123456"}, function(data) {
		alert(data.message);
	});
});
</script>
</body>
</html>